define(["jquery"],function(){
	function ready(){
		$(document).ready(function(){  
	      var $selectedSilo = $("#selectedSilo");   
	      if(typeof($selectedSilo) != "undefined" && $selectedSilo != null && $selectedSilo!= ""){       
		        var $a = $selectedSilo.val();		        
		        if($a != "" && $a != null){
		          $("#header_menu .theNav").css("color","white");
		          if($a != "abc"){
		             $("#"+$a).css("color","red");
		          }
	        }
        
		}    
	}
	function ceiling(){
		 $("#header_menu ul li").hover(
	          function(){
	            var $pop =  $(this).children(".pop_up").children(".pop_up_menu");
	            if($pop.length < 1){
	              $pop = $(this).children(".pop_up").children(".pop_up_menu1");   
	             
	            }
	            $pop.show();
	          },
	          function(){
	            var $pop =  $(this).children(".pop_up").children(".pop_up_menu");
	            if(typeof($pop) == "undefined" || 
	                (typeof($pop) != "undefined" && typeof($pop.html()) == "undefined")){
	              $pop = $(this).children(".pop_up").children(".pop_up_menu1");   
	            }
	            $pop.hide();
	          }
         );
	}
	function trigger(){
		 $('.activitiesWeek').click(function(){//周一周二周三选项卡效果
	        var n=$(this).index()
	        $('.theSlider').css({left: n*90+'px'})
	        $('.activitiesContent').eq(n).show().siblings('.activitiesContent').hide();
	    })
	}
	function suspend (){
		 $('.theActivities').hover(function(){// 周一周二周三下的悬浮框效果
	        $(this).find('.theMask').show();
	        $(this).find('.theButton').show();
	    },function(){
	        $(this).find('.theMask').hide();
	        $(this).find('.theButton').hide();
	    })
	}
   
    function scroll(){
    	$(function(){
	        var currentTop=$("#navBarId").offset().top;
	        $(window).scroll(function(){//滚动监听   滚动条向下滚动导航栏吸顶
	            var l=$(window).scrollTop();
	            if(l>=currentTop){
	                $('#navBarId').css({
	                    position:'fixed',
	                    top:0+'px',
	                })
	            }else{
	                $('#navBarId').removeAttr('style');
	        	}
        	}); 
    	})
    }
 
	return {
		ready : ready,
		ceiling : ceiling,
		trigger : trigger,
		suspend : suspend,
		scroll : scroll
	}
}